package com.ysd.dao.impl;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import com.ysd.util.DBManage;

public class pwdSqlDao {
	public int update(String name,String pwd) {
		int i=0;
		
		try {
			Connection conn = DBManage.getConn();
			Statement stam = conn.createStatement();
			String sql="UPDATE yonghu SET pwd='"+pwd+"' where name='"+name+"'";
			i=stam.executeUpdate(sql);
			DBManage.colseAll(null, stam, conn);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return i;
		
	}
}
